import grace from "../../utils/grace.js"
grace.page({
  data: {
    money:0.00
  },
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: '我的钱包',
    })
    this.loadData();
  },
  onShow:function(){
    this.loadData();
  },
  loadData:function(){
    this.$http.get('api/user/info', {}).then((res) => {
      this.$data.money = res.balance;
    })
  },
  toBalance:function(e){
    wx.navigateTo({
      url: '../balance_log/balance_log',
    })
  },
  openMoneyCharge: function () {
    wx.navigateTo({
      url: '../money_charge/money_charge'
    })
  },
  $onBackData(data) {
    if (data && data.isUpdate) {
     
    }
  }
})